# Packager: Justin Davis (juster) <jrcd83@gmail.com>
# $Id: PKGBUILD 180390 2013-03-20 21:47:54Z eric $

pkgname=perl-anyevent
pkgver=7.04
pkgrel=1
pkgdesc='the DBI of event loop programming'
epoch=4
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=(perl 'perl-ev>=4.00' 'perl-guard>=1.02' 'perl-async-interrupt>=1.0')
optdepends=('perl-net-ssleay: TLS/SSL connections with AnyEvent::Handle'
            'perl-json-xs: send or receive JSON with AnyEvent::Handle')
url=https://metacpan.org/release/AnyEvent
source=("http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/AnyEvent-$pkgver.tar.gz")
md5sums=('89c74c94f5b145b5330236708c5b0083')

build()
(
  cd AnyEvent-$pkgver
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check()
(
  cd AnyEvent-$pkgver
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  export PERL_ANYEVENT_LOOP_TESTS=1 PERL_ANYEVENT_NEW_TESTS=1
  make test
)

package()
(
  cd AnyEvent-$pkgver
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
